package com.xjscrm.common.utils.ww.dto;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author mingyang.chen create in 2024/5/6 18:08
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class WwAppSecretResultDTO extends WwBaseResultDTO {


    private String permanent_code;
    private CorpInfo dealer_corp_info;
    private AuthCorpInfo auth_corp_info;
    private AgentInfo auth_info;
    private AuthUserInfo auth_user_info;

    @Data
    public static class CorpInfo {
        private String corpid;
        private String corp_name;
    }

    @Data
    public static class AuthUserInfo {
        private String userid;
        private String open_userid;
        private String name;
        private String avatar;
    }

    @Data
    public static class AuthCorpInfo {
        private String corpid;
        private String corp_name;
        private String corp_type;
        private String corp_square_logo_url;
        private int corp_user_max;
        private String corp_full_name;
        private long verified_end_time;
        private int subject_type;
        private String corp_wxqrcode;
        private String corp_scale;
        private String corp_industry;
        private String corp_sub_industry;
    }

    @Data
    public static class AgentInfo {
        private List<AgentItem> agent;
    }

    @Data
    public static class AgentItem {
        private int agentid;
        private String name;
        private String round_logo_url;
        private String square_logo_url;
        private int auth_mode;
        private boolean is_customized_app;
        private boolean auth_from_thirdapp;
        private Privilege privilege;
        private SharedFrom shared_from;
    }

    @Data
    public static class SharedFrom {
        private String corpid;
        private int share_type;
    }

    @Data
    public static class Privilege {
        private int level;
        private List<Integer> allow_party;
        private List<String> allow_user;
        private List<Integer> allow_tag;
    }
}
